package com.iwhalecloud.citybrain.flow.platform.manager.application.common.enums;

/**
　　* @description: 文件处理类型枚举
　　* @author shenrm
　　* @date 2021/11/21 10:07
　　*/
public enum FileHandleTypeEnum {

    /**
     * 流程模型
     */
    FLOWMODEL("0","流程模型"),

    /**
     * 流程模型节点
     */
    FLOWACTIVITYMODEL("1","流程模型节点");

    private String code;

    private String name;

    FileHandleTypeEnum(String code, String name){
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getImpl() {
        return name;
    }

    public static FileHandleTypeEnum getEnumObjByCode(String code) {
        for (FileHandleTypeEnum typeEnum : FileHandleTypeEnum.values()) {
            if (typeEnum.code.equals(code)) {
                return typeEnum;
            }
        }
        return null;
    }
}
